﻿namespace Ganss.Excel.Tests.Data
{
    class DataItem
    {
        [Ignore]
        public string Bql { get; set; }

        [Ignore]
        public int Id { get; set; }

        [Column(2)]
        public string OriginalBql { get; set; }

        [Column(1)]
        public string Title { get; set; }

        [Column(3)]
        public string TranslatedBql { get; set; }

        public override bool Equals(object obj)
        {
            if (obj is not DataItem o) return false;
            return o.Bql == Bql && o.Id == Id && o.OriginalBql == OriginalBql && o.Title == Title && o.TranslatedBql == TranslatedBql;
        }

        public override int GetHashCode()
        {
            return (Bql + Id + OriginalBql + Title + TranslatedBql).GetHashCode();
        }
    }
}